package com.tracesystem.service;

import com.tracesystem.commons.Result;
import com.tracesystem.controller.form.*;
import com.tracesystem.controller.info.*;
import com.tracesystem.model.IssueBaseInfo;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 *  缺陷记录业务接口
 * </p>
 *
 * @author Kevin Martin
 * @since 2022-03-24
 */
public interface IssueBaseInfoService extends IService<IssueBaseInfo> {
    /*
     * @Description:新增缺陷业务接口
     * @Author: JMOCOK
     * @param issueForm: 新增缺陷参数
     * @return: com.tracesystem.commons.Result
     **/
    Result AddIssue(IssueForm issueForm);
    /*
     * @Description:更行缺陷业务接口
     * @Author: JMOCOK
     * @param issueForm: 更新缺陷参数
     * @return: com.tracesystem.commons.Result
     **/
    Result modifyIssueInfo(ModifyIssueForm modifyIssueForm);
    /*
     * @Description:删除缺陷
     * @Author: JMOCOK
     * @param issueId: 缺陷id
     * @return: com.tracesystem.commons.Result
     **/
    Result removeIssue(Integer issueId);
    /*
     * @Description: 查询缺陷详情
     * @Author: JMOCOK
     * @param issueId: 缺陷id
     * @return: com.tracesystem.commons.Result
     **/
    Result<IssueDetailInfo> getIssueDetailById(Integer issueId);

    Result<IssueInfo> findIssueById(Integer issueId);

    /*
     * @Description:查询参数列表
     * @Author: JMOCOK
     * @param issuePageForm: 分页查询参数
     * @return: com.tracesystem.commons.Result
     **/
    Result<IssuePage> findIssuePage(IssuePageForm issuePageForm);
    /*
     * @Description:批量删除缺陷
     * @Author: JMOCOK
     * @param batchesDeleteIssueForm: 批量删除参数
     * @return: com.tracesystem.commons.Result
     **/
    Result removeByIssueIds(BatchesDeleteIssueForm batchesDeleteIssueForm);
    /*
     * @Description:分配任务
     * @Author: JMOCOK
     * @param allotTaskForm: 分配任务参数
     * @return: com.tracesystem.commons.Result
     **/
    Result allotTask(AllotTaskForm allotTaskForm);
    /*
     * @Description:查询缺陷任务列表
     * @Author: JMOCOK
     * @param issuePageform: 分页查询参数
     * @return: com.tracesystem.commons.Result
     **/
    Result<IssuePage> findTaskPage(IssuePageForm issuePageForm);

    Result<ParentIssueInfo> findParentIssueList();

    Result<IssueDistributionInfo> getIssueDistribution(IssueDistributionForm issueDistributionForm);

}
